<script setup lang="ts">
import {ref} from "vue";

const message = ref('Hello Vue 3!')
const message1 = ref('1!')
const message2 = ref('2!')
const message3 = ref('3!')

const getMessage = () => {
  console.log(message.value)
}
</script>

<template>
  <div>
    <input type="text" v-model="message">
    <input type="text" v-model.lazy="message1">
    <input type="text" v-model.trim="message2">
    <input type="text" v-model.number="message3">
    <p>{{ message }}</p>
    <p>{{ message1 }}</p>
    <p>{{ message2 }}</p>
    <p>{{ message3 }}</p>

    <button @click="getMessage">获取数据</button>
  </div>
</template>

<style scoped>

</style>